package com.mathdroid.gui.componentlist;

/**
 * Implement this interface to create a custom list model.
 */
public interface IComponentListModel {

	/**
	 * Add an element to the list.
	 * @param e Element.
	 * @return The index of the element.
	 */
	int addElement(final AComponentListElement e);
	
	/**
	 * Remove an element from the list.
	 * @param e Element.
	 * @return Index of the element. Should return -1 if element not removed.
	 */
	int removeElement(final AComponentListElement e);
	
	/**
	 * Clear the list.
	 */
	void clear();
	
	/**
	 * @return The size of the list.
	 */
	int size();
}
